package day1106.Company;

import day1106.Company.Company;

import java.util.Scanner;
//String name, int age, String sex, String post, double salary, String num
public class CompanyTest {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        Company company = new Company();
        for (;;){
            System.out.println("1.添加员工  2.查询  3.查询公司人数  4.辞退员工  5.查找工资最高的员工   6.给年龄最大的人涨工资1000   0.退出");
            System.out.println("请选择：");
            int a = input.nextInt();
            if (a==1){
                System.out.println("请输入员工姓名：");
                String name = input.next();
                System.out.println("请输入员工年龄：");
                int age  = input.nextInt();
                System.out.println("请输入员工性别：");
                String sex = input.next();
                System.out.println("请输入员工职务：");
                String post = input.next();
                System.out.println("请输入员工工资：");
                double salary = input.nextDouble();
                System.out.println("请输入员工工号：");
                String num = input.next();
                company.add(name,age,sex,post,salary,num);
            }
            if (a==2){
                company.show();
            }
            if(a==3){
                company.num();
            }
            if (a==4){
                System.out.println("请输入要删除员工的工号");
                String num = input.next();
                company.delete(num);
            }
            if (a==5){
                company.max();
            }
            if (a==6){
                System.out.println("请输入要张工资的员工工号");
                String num = input.next();
                company.raise(num);
            }
            if (a==0){
                break;
            }
        }
    }
}
